//
// C++ Interface: GUIDData
//
// Description: GUIDData class header
// Implements the GUIDData data structure and support methods
//
//
// Author: Rod Smith <rodsmith@rodsbooks.com>, (C) 2010-2011
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef __GUIDDATA_CLASS
#define __GUIDDATA_CLASS

#include <stdint.h>
#include <string>

#include <uuid/uuid.h>

// Note: This class's data size is critical. If data elements must be added,
// it will be necessary to modify various GPT classes to compensate.
class GUIDData {
   private:
      static bool firstInstance;
   protected:
      uuid_t uuidData;
      std::string DeleteSpaces(std::string s);
   public:
      GUIDData(void);
      GUIDData(const GUIDData & orig);
      GUIDData(const std::string & orig);
      GUIDData(const char * orig);
      ~GUIDData(void);

      // Data assignment operators....
      GUIDData & operator=(const GUIDData & orig);
      GUIDData & operator=(const std::string & orig);
      GUIDData & operator=(const char * orig);
      void Zero(void);
      void Randomize(void);

      int operator==(const GUIDData & orig) const;
      int operator!=(const GUIDData & orig) const;

      // Data retrieval....
      std::string AsString(void) const;
};

std::ostream & operator<<(std::ostream & os, const GUIDData & data);

#endif
